package com.google.firebase.quickstart.database.custom.holder.holders.messages;

import android.view.View;

import com.google.firebase.quickstart.database.R;
import com.google.firebase.quickstart.database.common.data.model.Message;
import com.stfalcon.chatkit.messages.MessageHolders;

public class CustomIncomingTextMessageViewHolder
        extends MessageHolders.IncomingTextMessageViewHolder<Message> {

    private View onlineIndicator;

    public CustomIncomingTextMessageViewHolder(View itemView) {
        super(itemView);
        onlineIndicator = itemView.findViewById(R.id.onlineIndicator);
    }

    @Override
    public void onBind(Message message) {
        super.onBind(message);

//        boolean isOnline = message.getUser().isOnline();
//        if (isOnline) {
//            onlineIndicator.setBackgroundResource(R.drawable.shape_bubble_online);
//        } else {
//            onlineIndicator.setBackgroundResource(R.drawable.shape_bubble_offline);
//        }
    }
}
